# 扩展的功能
# 方便定制化功能
# 新增过滤器
from jinja2 import filters
import netaddr


def split(mystr,spl=''):
    if  spl=='':
        ret=mystr.split()
    else:
        ret=mystr.split(spl)
    return ret

def splitlines(mystr:str):
    return mystr.splitlines()

def add25(mystr:str):
    return f'{mystr}add288'

filters.FILTERS['add25'] = add25
filters.FILTERS['split'] = split
filters.FILTERS['splitlines'] = splitlines